Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core/Canvas): explicitly enable autoFocus #956

Merged
merged 6 commits into from
Dec 20, 2024
Merged

Conversation

nikku
Copy link
Member

@nikku nikku commented Dec 19, 2024

Proposed Changes

This ensures we're NOT automatically auto-focusing the canvas on any hover. Instead integrators must explicitly decide if this is desired, i.e. because the diagram is embedded as a "full page editor". We'll otherwise break embedding with existing applications, cf. bpmn-io/bpmn-js-examples#302.

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

We'll otherwise break embedding with existing applications, cf.
bpmn-io/bpmn-js-examples#302.
@nikku nikku added the ux label Dec 19, 2024
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Dec 19, 2024
@nikku nikku force-pushed the optional-autofocus branch from d06b3cd to 6f8ce2e Compare December 19, 2024 15:32
Ensure we update focus related behaviors consistently on manual
and DOM triggered interactions.
If canvas for whatever reason is not focused, then movement does not
happen.

Related to #662
@nikku
Copy link
Member Author

nikku commented Dec 19, 2024

Cf. bpmn-io/bpmn-js-examples#302 (comment) how this pans out in a real embedding scenario.

@barmac
Copy link
Member

barmac commented Dec 20, 2024

I think this is a great improvement which complements the keyboard binding changes. We shipped a slightly broken behavior in 15, and now fix it, so no breaking change.

@nikku nikku merged commit 8c07236 into develop Dec 20, 2024
12 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 20, 2024
@nikku nikku deleted the optional-autofocus branch December 20, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants